package com.hjm.project.accounts.virtualPolicyRecord.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import com.hjm.project.accounts.virtualPolicyRecord.mapper.VirtualPolicyRecordMapper;
import com.hjm.project.accounts.virtualPolicyRecord.domain.VirtualPolicyRecord;
import com.hjm.project.accounts.virtualPolicyRecord.service.IVirtualPolicyRecordService;
import com.hjm.common.utils.text.Convert;

import javax.annotation.Resource;

/**
 * 商户提现规则记录Service业务层处理
 * 
 * @author maker-platform
 * @date 2022-03-14
 */
@Service
public class VirtualPolicyRecordServiceImpl implements IVirtualPolicyRecordService {
    @Resource
    private VirtualPolicyRecordMapper virtualPolicyRecordMapper;

    /**
     * 查询商户提现规则记录
     * 
     * @param id 商户提现规则记录ID
     * @return 商户提现规则记录
     */
    @Override
    public VirtualPolicyRecord selectVirtualPolicyRecordById(Integer id) {
        return virtualPolicyRecordMapper.selectVirtualPolicyRecordById(id);
    }

    /**
     * 查询商户提现规则记录列表
     * 
     * @param virtualPolicyRecord 商户提现规则记录
     * @return 商户提现规则记录
     */
    @Override
    public List<VirtualPolicyRecord> selectVirtualPolicyRecordList(VirtualPolicyRecord virtualPolicyRecord) {
        return virtualPolicyRecordMapper.selectVirtualPolicyRecordList(virtualPolicyRecord);
    }

    /**
     * 查询商户提现规则记录列表
     *
     * @param virtualPolicyRecord 商户提现规则记录
     * @return 商户提现规则记录 一个结果
     */
    @Override
    public VirtualPolicyRecord selectVirtualPolicyRecordOne(VirtualPolicyRecord virtualPolicyRecord) {
        return virtualPolicyRecordMapper.selectVirtualPolicyRecordOne(virtualPolicyRecord);
    }

    /**
     * 新增商户提现规则记录
     * 
     * @param virtualPolicyRecord 商户提现规则记录
     * @return 结果
     */
    @Override
    public int insertVirtualPolicyRecord(VirtualPolicyRecord virtualPolicyRecord) {
        return virtualPolicyRecordMapper.insertVirtualPolicyRecord(virtualPolicyRecord);
    }

    /**
     * 修改商户提现规则记录
     * 
     * @param virtualPolicyRecord 商户提现规则记录
     * @return 结果
     */
    @Override
    public int updateVirtualPolicyRecord(VirtualPolicyRecord virtualPolicyRecord) {
        return virtualPolicyRecordMapper.updateVirtualPolicyRecord(virtualPolicyRecord);
    }

    /**
     * 删除商户提现规则记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteVirtualPolicyRecordByIds(String ids) {
        return virtualPolicyRecordMapper.deleteVirtualPolicyRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商户提现规则记录信息
     * 
     * @param id 商户提现规则记录ID
     * @return 结果
     */
    @Override
    public int deleteVirtualPolicyRecordById(Integer id) {
        return virtualPolicyRecordMapper.deleteVirtualPolicyRecordById(id);
    }
}
